package com.spicesoft.o3d.client;

import com.google.gwt.core.client.JavaScriptObject;

public class O3DSimple {

	private JavaScriptObject jsSimple;

	private O3DSimple(JavaScriptObject jsSimple) {
		this.jsSimple = jsSimple;
	}

	public static O3DSimple create(O3DClient client) {
		return new O3DSimple(jsCreate(client.getJSClient()));
	}

	private static native JavaScriptObject jsCreate(JavaScriptObject client) /*-{
      return $wnd.o3djs.simple.create(client);
    }-*/;

	public O3DSimpleShape createCube(int size) {
		return new O3DSimpleShape(jsCreateCube(jsSimple, size));
	}

	private static native JavaScriptObject jsCreateCube(JavaScriptObject jsSimple, int size) /*-{
      return jsSimple.createCube(size);
    }-*/;

}
